#/bin/bash

rm -rf ./build
mkdir ./build

mkdir ./build/logs
mkdir ./build/conf
mkdir ./build/static
mkdir ./build/view

echo "编译开始"
go build -v -x -o dog-blog
echo "编译结束\n"

echo "拷贝资源开始"
cp -ai ./conf/* ./build/conf
cp -ai ./static/* ./build/static
cp -ai ./view/* ./build/view
cp -ai ./dog-blog.db ./build
cp -ai ./start.sh ./build
cp -ai ./stop.sh ./build
mv ./dog-blog ./build

echo "拷贝资源结束"
